<%@page import="cn.edu.nju.ws.sview.wyge.relations.datasets.DatasetItem"%>
<%@page import="cn.edu.nju.ws.sview.views.Group"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!-- <link rel="stylesheet" type="text/css" href="/sview/css/relations/ds_relations.css">
<script type="text/javascript" src="/sview/script/relations/ds_relations.js"></script> -->
<%
	String ds_type = request.getParameter("ds_type");
	String idStr = request.getParameter("idStr");	
	int ds_id = Integer.parseInt(request.getParameter("ds_id"));
	String user = request.getParameter("user");
	String lang = request.getParameter("lang");
	String gname = (String)session.getAttribute("groupName");
	int ugid = Integer.valueOf(Group.getGroupIdByName(gname));
%>
<div class="tab-header">
	<!-- <div id="originalDiv" class="tab original" >
		<a href="javascript:void(0)" >原始关系</a>
	</div> -->
	<%
	//System.out.println("user:;;"+user+"|"+(user!=null));
	if(user!=null && !user.contentEquals("null") && !ds_type.contentEquals(DatasetItem.TEMP_GENRE)) {%>
	<div id="favoriteDiv" class="tab favorite" >
		<a href="javascript:void(0)" >喜爱的关系</a>
	</div>
	<%} %>
	<div id="ordinaryDiv" class="tab ordinary" >
		 <a href="javascript:void(0)" >可用的关系</a>
	</div>		
	<%if(user!=null && !user.contentEquals("null") && !ds_type.contentEquals(DatasetItem.TEMP_GENRE)) {%>
	<div id="trashDiv" class="tab trash" >
		<a href="javascript:void(0)" >回收站</a>
	</div>                 
	<%} %>					    				 
</div>
<div id="relation-content">
	<div class="vnav-box">
	   	<div class="vnav"></div>
	   	<div class="nv-box"><a id='new_button' class='rcreate' href='javascript:void(0)' title='Create a new relation'>新建</a></div>
	   	<!-- <div class="nv-box"><a id="new_button" class="rcreate" href="javascript:void(0)" title="Create a new relation">New</a></div> -->
	</div>
	<div id="rel_content">
		<div id="rel_title"></div>
		<div class="operations">
			<span class="set_btn">
				<button class="rset ui-button ui-widget ui-state-default ui-corner-all ui-button-icons-only"  > 
				<span class="icon-gear"></span>
				<span class="icon-triangle-1-s"></span>
				</button>
			</span>
			<div class="dmenu" id="smenu">
					<ol>
					<li><a href="javascript:void(0)" class="rel-edit">编辑</a></li>
					<li><a href="javascript:void(0)" class="rel-translate">翻译</a></li>
					</ol>
			</div>
		</div>
		<div id="info">
			<div id="rel_table"></div>
			<div id="rel_meta"></div>
		</div>
	</div>
</div>
<%-- <a id="new_button" href="javascript:void(0)">新建</a>
<div id="relations">
	<%
		if (!user.equals("null")) {
	%>
	<h3>
		<a href="#" id="favorite">喜爱的关系</a>
	</h3>
	<div class="view-content favorite"></div>
	<%
		}
	%>
	<h3>
		<a href="#" id="ordinary">可用的关系</a>
	</h3>
	<div class="view-content ordinary"></div>
	<%
		if (!user.equals("null")) {
	%>
	<h3>
		<a href="#" id="trash">回收站</a>
	</h3>
	<div class="view-content trash"></div>
	<%
		}
	%>
</div>
<div id="rel_content">
	<a id="edit_button" href="javascript:void(0)"></a>
	<div id="rel_title"></div>
	<div id="rel_meta"></div>
	<div id="rel_table"></div>
</div> --%>

<input type="hidden" id="display-lang" value="zh" />
<input type="hidden" id="ds_type" value="<%=ds_type%>" />
<input type="hidden" id="ds_id" value="<%=ds_id%>" />
<input type="hidden" id="idStr" value="<%=idStr%>" />
<input type="hidden" id="user" value="<%=user%>" />
<%if(ugid > 0){%>
<input type="hidden" id="ugid" value="<%=ugid %>" />
<%}%>